package com.nineclock.system.feign;


import com.nineclock.common.entity.Result;
import com.nineclock.system.dto.SysCompanyUserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient("sys-service")
public interface SysOrganizationFeign {

    //查询企业ID下的所有顶级部门ID
    @GetMapping("/organization/department/top")
    public Result<List<Long>> queryDepartmentIds();

    //根据部门id查询子部门的人数
    @GetMapping("/organization/department/membernum")
    public Result<Integer> queryUserCountByDepartmentIds(@RequestParam("departmentIds") List<Long> departmentIds);

    @GetMapping("/organization/members/simple")
    public Result<List<SysCompanyUserDTO>> queryAllCompanyUser();
}
